#include <stdio.h>
#define SIZE   51
void main(){
	int data[SIZE] = {0};
	int index = 1;
	int n;
	int i, j, k;
	data[1] = 1;
	scanf("%d",&n);
	for ( i=1;i<=n;i++ ){
		for ( j=1;j<=index;j++ ){
			data[j]=data[j]*i;
		}
		for ( k=1;k<index;k++ ){
			if (data[k]>=10){
				data[k+1] += data[k]/10;
				data[k] = data[k]%10;
			}
		}
		while ( data[index]>=10 && index<=SIZE-1 ){
			data[index+1] += data[index]/10;
			data[index] = data[index]%10;
			index++;
		}
		if (index<=SIZE-1){
			printf("%d! = ",i);
			for (j=index;j>0;j--){
				printf("%d",data[j]);
			}
		}else {
			printf("error");
		}
		printf("\n");
	}
}
